import { Injectable } from "@angular/core";
import { ActivatedRouteSnapshot, Resolve } from "@angular/router";
import { SongSheet } from "src/app/services/data-types/common.types";
import { SheetService } from "src/app/services/sheet.service";

@Injectable()
export class SheetInfoResolverService implements Resolve<SongSheet>{
  constructor( private sheetServe: SheetService ){}
  resolve(route: ActivatedRouteSnapshot){
    return this.sheetServe.getSongSheetDetail(Number(route.paramMap.get('id')));
  }
}
